package com.zahb.qadx.model;

import android.os.Parcel;
import android.os.Parcelable;


public class WorkExRequest implements Parcelable {

/*    userWorkExperienceList object [] 非必须   item 类型: object
    startDate string 非必须  开始时间
    endDate string 非必须  结束时间
    company string 非必须  工作单位
    job string 非必须  职务
    endDateType number 非必须  结束时间类型0:至今 1:有具体的结束时间*/


    public String startDate;
    public String endDate;
    public String company;
    public String job;
    public int endDateType;

    public String getEndData(){
        if(endDateType==0){
            return "至今";
        }else{
            return endDate;
        }
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.startDate);
        dest.writeString(this.endDate);
        dest.writeString(this.company);
        dest.writeString(this.job);
        dest.writeInt(this.endDateType);
    }

    public WorkExRequest() {
    }

    protected WorkExRequest(Parcel in) {
        this.startDate = in.readString();
        this.endDate = in.readString();
        this.company = in.readString();
        this.job = in.readString();
        this.endDateType = in.readInt();
    }

    public static final Creator<WorkExRequest> CREATOR = new Creator<WorkExRequest>() {
        @Override
        public WorkExRequest createFromParcel(Parcel source) {
            return new WorkExRequest(source);
        }

        @Override
        public WorkExRequest[] newArray(int size) {
            return new WorkExRequest[size];
        }
    };
}
